import request from '@/utils/request'

// 查询消费记录列表
export function listSpend(query) {
  return request({
    url: '/spend/spend/list',
    method: 'get',
    params: query
  })
}

// 查询消费记录详细
export function getSpend(id) {
  return request({
    url: '/spend/spend/' + id,
    method: 'get'
  })
}

// 新增消费记录
export function addSpend(data) {
  return request({
    url: '/spend/spend',
    method: 'post',
    data: data
  })
}

// 修改消费记录
export function updateSpend(data) {
  return request({
    url: '/spend/spend',
    method: 'put',
    data: data
  })
}

// 删除消费记录
export function delSpend(id) {
  return request({
    url: '/spend/spend/' + id,
    method: 'delete'
  })
}
